package designPattern.singleton.lazy;

import java.lang.reflect.Constructor;

/*
破坏单例模式示例
 */
public class DestorySingletonDemo {
    public static void main(String[] args) {
        Class<?> clazz = StaticInnerClassSingleton.class;
        Constructor c;
        {
            try {
                c = clazz.getDeclaredConstructor(null);
                c.setAccessible(true);
                Object instance = c.newInstance();
                System.out.println(instance);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
